

void sortColors(int* nums, int numsSize){
    int left = 0;
    int right = numsSize-1;
    for(int i = 0; i <= right; i++)
    {
        if(nums[i] == 0)
        {
            int tmp = nums[i];
            nums[i] = nums[left];
            nums[left] = tmp;
            left++;
        }
        if(nums[i] == 2)
        {
            int tmp = nums[i];
            nums[i] = nums[right];
            nums[right] = tmp;
            right--;
            i--;            
        }
        
    }
}